<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<!--新增任务弹出modal-->
<div th:fragment="task_add_modal" class="modal fade" id="task_add_modal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel_testsuit"
     aria-hidden="true" data-backdrop="static">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">新增任务</h4>
            </div>
            <div class="modal-body">
                <form id="task_add_form" class="form-horizontal">
                    <div class="alert alert-warning alert-dismissible fade in" role="alert"
                         style="display: none">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                                aria-hidden="true">×</span>
                        </button>
                        <strong>提示</strong> 输入信息错误，请检查！
                    </div>
                    <div class="form-group">
                        <label class="col-sm-4 control-label">任务名称</label>
                        <div class="col-sm-12">
                            <input name="taskName" type="text" class="form-control" placeholder="task name">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label">任务类型</label>
                        <div class="col-sm-10">
                            <label>
                                <select class="form-control" name="jobClass" id="job_class_a">
                                    <option value="TestCase">测试用例</option>
                                    <option value="TestSuit">测试集合</option>
                                </select>
                            </label>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label">测试对象</label>
                        <div class="col-sm-10">
                            <label>
                                <select class="selectpicker" name="runWith" id="run_with_a" data-live-search="true">
                                </select>
                            </label>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-4 control-label">配置时间</label>
                        <div class="col-sm-12">
                            <input name="cronExpression" type="text" class="form-control" placeholder="cron expression">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-4 control-label">任务组</label>
                        <div class="col-sm-12">
                            <input name="jobGroup" type="text" class="form-control" placeholder="job group">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-4 control-label">任务描述</label>
                        <div class="col-sm-12">
                            <textarea name="description" type="text" rows="5" class="form-control"
                                      placeholder="description here"></textarea>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button id="addTaskBtn" type="button" class="btn btn-primary" onclick="add_task()">保存</button>
            </div>
        </div>
    </div>
</div>

<!--修改测试集弹出modal-->
<div th:fragment="testsuit_update_modal" class="modal fade" id="testsuit_update_modal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel_testsuit_u"
     aria-hidden="true" data-backdrop="static">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">修改测试用例集</h4>
            </div>
            <div class="modal-body">
                <form id="testsuit_update_form" class="form-horizontal">
                    <div class="alert alert-warning alert-dismissible fade in" role="alert"
                         style="display: none">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                                aria-hidden="true">×</span>
                        </button>
                        <strong>提示</strong> 输入信息错误，请检查！
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">编号</label>
                        <div class="col-sm-12">
                            <input name="testSuitId" type="text" class="form-control" id="testsuitId_u"
                                   placeholder="id" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">测试集名称</label>
                        <div class="col-sm-12">
                            <input name="suitName" type="text" class="form-control" id="suitName_u"
                                   placeholder="suitName">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label">所属项目</label>
                        <div class="col-sm-10">
                            <label>
                                <select id="belongProject_suit_u" class="form-control" name="belongTo">
                                </select>
                            </label>
                        </div>
                    </div>

                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button id="updateSuitBtn" type="button" class="btn btn-primary">保存</button>
            </div>
        </div>
    </div>
</div>

<!--关联接口弹出modal-->
<div th:fragment="testsuit_link_modal" class="modal fade" id="testsuit_link_modal" tabindex="-1" role="dialog"
     aria-labelledby=""
     aria-hidden="true" data-backdrop="static">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="height: 600px;width: 800px">
            <div class="modal-header">
                <h4 class="modal-title">关联测试用例</h4>
            </div>
            <div class="modal-body">
                <form id="testsuit_link_form" class="form-horizontal">
                    <div class="alert alert-warning alert-dismissible fade in" role="alert"
                         style="display: none">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                                aria-hidden="true">×</span>
                        </button>
                        <strong>提示</strong> 输入信息错误，请检查！
                    </div>
                    <table class="table table-hover table-bordered" style="white-space: nowrap" id="linkTable">
                        <thead>
                        <tr>
                            <th th:class="text-center">编号</th>
                            <th th:class="text-center">名称</th>
                            <th th:class="text-center">描述</th>
                            <th th:class="text-center">接口</th>
                            <th th:class="text-center">测试集</th>
                            <th th:class="text-center">操作</th>
                        </tr>
                        </thead>
                        <tbody id="link_tbody">
                        <!--js生成表格内容-->

                        <td class="text-center">
                            <div class="animated-checkbox"><label><input type="checkbox" name="caseid"
                                                                         value="{testcaseId}"><span class="label-text">关联</span></label>
                            </div>
                        </td>

                        </tbody>
                    </table>

                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button id="linkTestCaseBtn" type="button" class="btn btn-primary" onclick="linkTestCase()">保存</button>
            </div>
        </div>
    </div>
</div>

</html>